from bs4 import BeautifulSoup								#导入库
soup = BeautifulSoup(open('index.html'),'lxml')					#创建对象
content = soup.head.title.string
for parent in content.parents:								#遍历全部父节点
	print(parent.name)									#输出名称
